package com.polaris.live.dialog

import android.content.Context
import com.lxj.xpopup.core.CenterPopupView
import com.polaris.live.common.R
import com.polaris.live.common.databinding.DialogTestChargeBinding
import com.polaris.live.common.ext.setOnSingleClickListener

/**
 * 测试充值弹窗
 *
 * @author Created by 半仙 on 2023/8/9/009 11:12
 */
class TestChargeDialog(
    context: Context,
    private val onRechargeBack: ((unit: String) -> Unit)
) :
    CenterPopupView(context) {

    private lateinit var mBinding: DialogTestChargeBinding

    override fun getImplLayoutId(): Int {
        return R.layout.dialog_test_charge
    }

    override fun onCreate() {
        super.onCreate()
        mBinding = DialogTestChargeBinding.bind(popupImplView)

        mBinding.tvConfirm.setOnSingleClickListener {
            onRechargeBack.invoke("")
            dismiss()
        }
    }
}